import { Suspense } from "react";
import { RouterProvider, createBrowserRouter } from "react-router-dom";

import { Loading } from "@/components/loading";
import routes from "@/routes";

function App() {
  return (
    <Suspense fallback={<Loading />}>
      <RouterProvider router={createBrowserRouter(routes)} fallbackElement={<p>Loading...</p>} />
    </Suspense>
  );
}

export default App;
